23. Exercise: Add Content Grouping
L10 38 Content Grouping SC
1. Wrap content group in a LinearLayout.
We've provided the code in add_gdg_fragment.xml. You just have to uncomment the LinearLayout and closing tag surrounding labelTextWhy and EditTextWhy.**
2. Remove all layoutMargins from labelTextWhy and EditTextWhy.
3. Update EditTextRegion's bottom constraint to reflect the new wrapper layout instead of the individual elements.
app:layout_constraintBottom_toTopOf="@+id/contentGroup"
4. Update button’s constraints to reflect the new contentGroup wrapper layout instead of the individual elements.
app:layout_constraintTop_toBottomOf="@+id/contentGroup"
Run your app and make sure the new constraints are working correctly.
If you want to start at this step, you can download this exercise from: Step.10-Exercise-Add-Content-Grouping.
You will find plenty of //TODO comments to help you complete this exercise, and if you get stuck, go back and watch the video again.
Once you’re done, you can check your solution against the solution we’ve provided here: Step.10-Solution-Add-Content-Grouping, or using this git diff.
Task Description:
Complete the following tasks to apply content grouping to your views.
Task Feedback:
Awesome!